
The Level File

This file contains all the basic information about your map. It contains the name and race of all the starting ship files, the name of the resource file, the universe size, the lighting type, the background type, the sensor manager zoom sizes, the default song to be played and any ship restrictions. Each of these elements has their own line and their own series of comma separated attributes.

The level files must be present in every directory; correctly spelt numbered and named the same as the directory in which it resides.

-------------------------------------------------------------

Tutorial Map Part Five

Open up the Tutorial Map folder and copy the file called 'TutorialMap2.level' into your 'Revelations2' folder. Rename the file 'Revelations2.level' (always take care that when you rename the *.level file to match the folder it resides in, that you rename it EXACTLY as the name of the folder is, remember when we talked about CaSe?).

-------------------------------------------------------------

Lets open up this level file and take a wee look around. There are three major parts to this file and we will deal with each bit separately. 

Comment Lines And Game Information

Take a look at the first 6 lines, they look like this:

; MissionMan script, Friday, Sep 3 1999, 12:15:09 PM
; Copyright (c) 1998-99, Relic Entertainment Inc.
; Multiplayer Level: TutorialMap2
; Info: The Tutorial Map (2-8)

[The Tutorial Map (2-8)]

The first four lines are comment lines, (these are actually generated by MissionMan, but as I've already stated; I have never used it and so I can't make that statement with any modicum of authority). You'll have noted the semicolon in front of these four lines indicating that the game will ignore these lines when loading your map yes? We-ell, this ain't strictly true here, the first two lines, yes, but the third and fourth lines have to be in the format shown above. 

The 'Multiplayer Level' tag is the folder name, also the name of the level file you are working in. The 'Info' tag it appears can be changed, but its best to follow the format given above, where the 'Info' tag is the name of your map, as given on the 6th line, the line in square brackets. This bit in square brackets is the game name as it appears in the game itself, when you select your map in homeworld, that is what you will see. 

Another wee point here, in the manual it states that: ' The number listed after the map name shows how many players that map supports.' You have to do this yourself, its part of the map name.

-------------------------------------------------------------

Tutorial Map Part Six

These first 6 lines have to retain their Format, so all you will change is the Multiplayer Level: tag, and the Info: tag and the name of your map in the square brackets. Keep the blank lines as spaces between the four header lines and the map name in the square brackets as well as the blank line immediately after. 

Change the map name to 'Revelations2', change the info tag to 'Revelations (2-6)', and change the name in square brackets to 'Revelations (2-6)' 

So now your header should look like this:


; MissionMan script, Friday, Sep 3 1999, 12:15:09 PM
; Copyright (c) 1998-99, Relic Entertainment Inc.
; Multiplayer Level: Revelations2
; Info: Revelations (2-6)

[Revelations (2-6)]

-------------------------------------------------------------

The Missionsphere Lines

Under these lines, every file has a reference line for each ResourceSphere and Mothership file in the directory in which it resides. What I'm saying here is that the next three lines all beginning with 'MissionSphere<tab>' (the MissionSphere lines) is telling the game what files to look for, for the information required for the resources you have on the map (the ResourceSphere_*.missphere file) and the player starting co-ordinates (Mothership_*.missphere files). They look like this:

MissionSphere    -1,?,ResourceSphere,0.0,0.0,0.0,30000.0,0.0,ResourceSphere_1.missphere,1000
MissionSphere    0,R1,Mothership,0.0,0.0,0.0,30000,0.0,Mothership_0.missphere,1000
MissionSphere    1,R2,Mothership,0.0,0.0,0.0,30000.0,0.0,Mothership_1.missphere,1000

"What are all they numbers and stuff after the 'MissionSphere<tab>' leader?" I hear you ask. Well, let's go through them, they are;

PlayerNumber,RaceName,Misspheretype,posx,posy,posz,Radius,Sphererotz,Contents,StartingRU's

PlayerNumber
This is the player Number assigned to the players by the computer. -1 for no player (CPU), 0 for the first player, (the Player starting the Map (i.e. You, unless of course, you are joining the game over WON), 1 for the second and so on. If you start a 1v1 against the computer you will take the place of player 0.

RaceName
This is where you define what race the mission sphere is dealing with (where; ? = No Race, R1 = Kushan and R2 = Taiidan). When you assign these, it seems that it means nothing as I find the computer (at least in the smaller games with 2 players) automatically assigns the opposite race to what you are playing. Also, in games over WON all the players will have already decided what race they wish to use. Still I find it best to set this up as if it really mattered and usually do so accordingly (perhaps this is why I see no effect of my naming?).

Misspheretype
This tells the game what type of file is being dealt with here, where; 'ResourceSphere' is resources, and 'Mothership' is your player starting fleets/positions. Remember this has to tie in with the file named, near the end of this line, see 'Contents' below.

Posx, Posy, Posz 
Homeworld maps are created by assigning each element of the map (ships, resources, derelicts) a three-part Cartesian co-ordinate (X,Y,Z values). The X and Y values are the axis that run along the midpoint plane and the Z co-ordinate is how far above and below the midpoint something is located. The centre of all Homeworld maps is at 0,0,0. This means that elements placed below the midpoint have negative values and those above it have positive values. For the Level file however, this matters not a jot, so don't worry about them at this stage, just leave them as 0,0,0 as the position of the mission sphere is not important - it only matters that its there.

Radius
The radius of mission sphere, again it doesn't matter in the slightest about this. Both the positions and radius of the mission sphere are MissionMan values, so again just ignore it and leave it as the universally accepted '30000'

Sphererotz
This is the angle of rotation of the mission sphere, 1000.0 points towards centre of universe, again it's a MissionMan generated value so pay it no attention and leave it at '0'. 

Contents
Now this is important. It refers to the '*.missphere' file, telling the game what file to go and look for in the folder that this level file is in. In that file it will find the contents of the MissionSphere. Pay Attention to this value! If you take a look at the TutorialMap2.level file I have quoted above then you will see in the first line, the 'ResourceSphere' line, then the contents value tells the game that the resources to go in this MissionSphere will be found in the file called; 'ResourceSphere_1.missphere'. Be careful of the numbering in the naming of this file as it's a common error to have the wrong number, or the CaSe doesn't match.

startingRU's
This never works for me, I have kinda given up on it. What is does is give the number of RU's the player starts with. This integer is optional I'm told. Usually I just leave it at '1000' and deal with starting RU's in the Description.txt file, as that appears to take precedence. Who Knows?

-------------------------------------------------------------

Tutorial Map Part Seven
Take a look at these three mission sphere lines we have been discussing in your Revelations2.level file. We see that these refer to a Resourcesphere file entitled 'ResourceSphere_1.missphere' and two Mothership files entitled 'Mothership_0.missphere' (for the first player) and 'Mothership_1.missphere' (for the second player). This is fine, lets leave these as they are, we will eventually be adding these files as named here but for the moment lets move on to the last chunk of lines in your level file.

-------------------------------------------------------------

Ok then, so that covers the MissionSpheres. To summarise; these lines name the files the game will find all the resources and player info it needs. They may look complicated but you will never need to change much with them, only the PlayerNumber and contents for the Mothership file and just make sure you name your ResourceSphere file correctly. 

Map Level Data

This next block of lines regards your map settings. Specifically dealing with the global settings of your map; its background, the overall size what ship types will be available on it, what resource types are available on it, and the default music that will blare out everyone's speakers as the load up your wondrous maply creations. The following lines must be identical in each level file:

- Lighting (sets the lighting of your map)
- Background (sets the background to your map)
- SmDepthCueRadius (sets the radius for the depth cue circle in the sensors manager)
- smDepthCueStartRadius (sets the starting radius for the depth cue circle in the sensors manager)
- smCircleBorder (sets the radius for the movement depth cue circle in the sensors manager)
- smZoomMax (sets the maximum zoom range for the sensors manager)
- smZoomMin (sets the minimum zoom range for the sensors manager)
- smInitialDistance  (Initial Starting Distance?)
- smUniverseSizeX (sets the width of the universe)
- smUniverseSizeY (sets the height of the universe)
- smUniverseSizeZ (sets the depth of the universe)
- ExcludeShips (sets which ships will not be used in a mission)
- IncludeShips (sets which ships will be used in a mission)
- ExcludeAsteroid (sets which asteroid will not be used in a mission)
- IncludeAsteroid (sets which asteroids will be used in a mission)
- ExcludeDerelict (sets which derelicts will not be used in a mission)
- IncludeDerelict (sets which derelicts will be used in a mission)
- BaseColor (sets the base colour of ships)
- StripColor (sets the stripe colours of ships)
- AvailableColorSchemes (sets the colours available for ships)
- SongNumber (sets which song will be played in a mission)
Background and lighting settings
Lighting and backgrounds are usually set-up like this:

lighting ez01
background ez01, 180, 0

The backgrounds for all the single player missions are called 'ez01', ez02', 'ez04' etc, So, for example: ez02 is the second mission, ez10 is the tenth mission, and ez16 is the last mission. You can put in any number between 01 and 16, (03 is the same as 01 remember as both these missions occur in orbit of Kharak). You can also replace 'ez##' with 'default' or if you are feeling a little more adventurous add your own background by naming your custom background file here. To add your own background just make sure the correct files (lighting files: '*.hsf' and background files: '*.btg') are copied into all the map directories where the game will find them, and name the file, minus the .hsf/.btg suffixes. (See the Tutorial Map Part Eight).

Certain maps have a very distinct light source, like the 'SuperNova' mission, the light source has to be set in a specific way. Its defined with a degree setting based on a sphere. However, the light source is stationary, it will always shine from a fixed point. Luckily, you can rotate the background by adjusting the two values after the ez01 field as listed above. The first value is the 'rotz' (rotation about the z-axis or horizontal rotation), and the second is the 'roty' (rotation about the y axis or Vertical 'Up/Down' rotation). While you can spin your background about the z axis (horizontal rotation) to your hearts content I find the if you rotate you background too far on the vertical axis (Up/Down) it starts to warp the background, eventually ruining it big time. So, I would suggest you don't stray over 25 when changing this last value.
Sensors Manager: Universe size and Scanner radii
Right, take a look at the next nine lines all beginning with 'sm'. The sm stands for sensors manager giving you a huge hint as to what they are referring to. Let's take a look at these lines as they are in the TutorialMap2.level file;

smDepthCueRadius    50000
smDepthCueStartRadius    20000
smCircleBorder    90000
smZoomMax    500000
smZoomMin    30000
smInitialDistance    145000
smUniverseSizeX    200000
smUniverseSizeZ    100000
smUniverseSizeY    200000

The first three lines deal with they big circles you see in the sensors manager, the Depth Cues and Circle Border radii, changing them appears to do nothing for me, I have always left them well alone and none of my maps seem to have suffered for it. (IMHO)

The smZoomMax and the smZoomMin deal with how far you can zoom out and how far you can zoom in on the sensor manager. Depending on your overall map size you would scale these accordingly, its no use being able to zoom out 1,000,000km if you map is only 200km in length etc. As for how far you want to be able to zoom in it's really up to you and your map how close in you want to get on the sensors manager. So far I have never come across a limit as to the Max or Min zoom.

The smInitialDistance shows how far out the camera will be when you go into the sensors manager, just make sure in your map that it is less than the Max zoom and more than the Min zoom.

SmUniverseSize gives the dimensions of the playing area (i.e. how far from the centre each player can go). The axis are measured from the centre so above shows that the map has an overall length of 400000 (400km), a height of 200000 (200km) and a width of 400000 (400km). You will know yourself how big you want your map to be and only need adjust these values accordingly. A point I should make about this is; if you start up the map and discover your starting fleet is moving and you have limited control (if any) over them then that means your fleet has started too far out, they will move until they reach the playing area of your map as defined by these values.

-------------------------------------------------------------

Tutorial Map Part Eight

Ok then, lets sort out the universal map settings of our map. The first thing we want to do is decide on a background and lighting source for the map. Our Revelations2.level file has currently got lighting file 'ez05' and background file 'ez05' set. These correspond to lighting file ez05.hsf and background file ez05.btg (the Lighting and Background from single player mission Five), which are found within the homeworld.big file if you'd care to go looking with the 'BIG viewer'. We are going to change these, not to another single player map file, but to a brand new one as supplied to us by the inimitable /Downslope\.  

In the Tutorial Map files folder there are two files that I want you to copy into your Revelations2 folder they are 'Downslope.hsf' and 'Downslope.btg'. Next open up the Revelations2.level file and change 'ez05' to 'Downslope' for both the lighting and the Background lines. In the Background line, change the rotz from 180 degrees to 0 degrees.

Next we have the Sensor Manager parameters. Leave the first three lines alone (the smDepthCueRadius, smDepthCueStartRadius and the smCircleBorder). The Zoom Max and Zoom Min we will leave also, these are fine for our needs, and we are not making a huge map. 

We will however reduce the size of our map though, change the next three parameters regarding the Universe size to 150000. Do this for all three lines (smUniverseSizeX, smUniverseSizeZ and smUniverseSizeY). This will make a big cube of 300km in length, width and breadth.

Ok then, so that covers the MissionSpheres. To summarise; these lines name the files the game will 

These lines should now look like this;

Lighting    Downslope
Background    Downslope, 0, 0
smDepthCueRadius    50000
smDepthCueStartRadius    20000
smCircleBorder    90000
smZoomMax    500000
smZoomMin    30000
smInitialDistance    145000
smUniverseSizeX    150000
smUniverseSizeZ    150000
smUniverseSizeY    150000

-------------------------------------------------------------

Determining what ships and resources to load
Not all ships/resources/derelicts etc. need be loaded for every level.  Substantial savings in loading time and texture RAM can be realised by excluding some things from the load. By default everything is loaded every level. If something is loaded in one level and not loaded the next, the space it occupied (in RAM and texture RAM) is freed for other uses. "But my computer is the greatest machine of all time!" I hear you cry! "Why should I exclude things from my map?" Well, I'll let Obithrawn field this one with a quote from his 'Homeworld Mapmaking Help and FAQ'

- To go along with the story line, or just to create an interesting map (my map, 'The Strike', for example, only lets you build strike craft)
- To reduce loading time, if you exclude all the races beside R1 and R2, the loading time will be significantly less. 
- If you don't load something, the RAM will go to using something else, and this will reduce lag. 
- If you include too much stuff some of Homeworld's graphics start getting screwy... 

See that 1st point he made? Excluding R1 and R2 ships will remove them from the Build Manager (as long as they are not on the map to begin with), so you could quite feasibly exclude all ships above strike craft, and they will not be available on your map at all. I suggest you get hold of either; 'The strike' or 'Planetary Wars' both of which deal with this issue admirably and can give you a good idea of how easily this is done and just how much this can change a map.
Ships
The directives to control this are:

ExcludeShips		race,shiptype
IncludeShips		race,shiptype

The values of race are any of R1, R2, P1, P2, P3, or Traders. The value of 'shiptype' would be any 'shiptype' valid for these races.  'shiptype' can also be 'All' which will include or exclude that entire race. (Genocide so to speak!) See Below for all the 'shiptype' values you can use. Continuing with Obithrawn's FAQ ;

"Do I have to exclude things individually?" 
- No, you can exclude an entire race by putting: ExcludeShips Race (P1, P2, P3, Traders), ALL

"How can I exclude most things, but not all?"
- You can put: ExcludeShips P1, ALL Then below it put: IncludeShips P1, P1MissileCorvette
This will exclude all P1 ships, except for the Missile Corvette.


Shiptype is:

R1/R2 (Kushan/Taiidan):

For The MS:	Mothership; Carrier
For Fighters:	LightInterceptor; HeavyInterceptor; AttackBomber; LightDefender; HeavyDefender;
CloakedFighter (R1 Only); DefenseFighter (R2 Only)

For Corvettes: 	LightCorvette; RepairCorvette; SalCapCorvette; HeavyCorvette; 
MultiGunCorvette; MinelayerCorvette; 

For Harvesters:	ResourceCollector; ResourceController

For Frigates:	AdvanceSupportFrigate; StandardFrigate; IonCannonFrigate; 
DDDFrigate (R1 Only); DFGFrigate (R2 Only)

For CapShips: 	StandardDestroyer; MissileDestroyer; HeavyCruiser

For Misc Ships:	ResearchShip; Probe; ProximitySensor; SensorArray; CloakGenerator; 
GravWellGenerator

For Weirdness:	Drone (R1 Only); CryoTray; HeadShotAsteroid; TargetDrone

P1 (Turanic): 	P1Mothership; P1Fighter; P1StandardCorvette; P1MissileCorvette;
P1IonArrayFrigate

P2 (Kadeshi):	P2Mothership; P2Swarmer; P2AdvanceSwarmer; P2FuelPod; P2MultiBeamFrigate

P3 (T-Mat):	P3Frigate; P3MegaShip

Traders (misc.):	CargoBarge; GhostShip; FloatingCity; MiningBase
Junk_Lgun; Junk_Sgun; JunkyardDawg; JunkyardHQ
ResearchStation; ResearchStationBridge; ResearchStationTower

[See Appendix I]

Resources
As you can exclude all the 'shiptypes' you have no intention of using on your map, you can do the same with the resources, specifically the 'resourcetypes'. The directives to control this are:

Exclude<Asteroids|DustCloud|GasCloud|Nebula> 	resourcetype
Include<Asteroids|DustCloud|GasCloud|Nebula> 	resourcetype

Resourcetype is:

For asteroids:	Asteroid0; Asteroid1; Asteroid2; Asteroid3; Asteroid4; HeadShotAsteroidR1; 
HeadShotAsteroidR2

For dust clouds:	DustCloud0; DustCloud1; DustCloud2; DustCloud3

For Nebulae:	Nebula0; Nebula1; Nebula2; Nebula3; Nebula4

For gas clouds:	GasCloud0; GasCloud1; GasCloud2; GasCloud3; GasCloud4

[See Appendix I]

An important note on Gas Clouds; These are not supported and thus should not be used. They crash the game outright, so the line 'ExcludeGasCloud   All' should be your only mention (if ever) of Gas Clouds.
Derelicts 
The directives to control this are:

ExcludeDerelict 		derelicttype
IncludeDerelict 		derelicttype

derelicttype is:

For planets:	AngelMoon; AngelMoon_clean; Homeworld; PlanetOfOrigin; 
PlanetOfOrigin_scarred (Backgrounds)
For crates:	Crate

For odd ships:	Ghostship; PrisonShipNew; PrisonShipOld; LifeBoat; Shipwreck

For the Scaffold:	Scaffold; Scaffold_scarred; ScaffoldFingerA_scarred; ScaffoldFingerB_scarred

For space junk:	Junk0_antenna; Junk0_fin1; Junk0_fin2; Junk0_GunAmmo; Junk0_LGun;  Junk0_panel; Junk0_sensors; Junk0_SGun; Junk1_partA; Junk1_partB; Junk1_shell; Junk1_strut; Junk2_panelA; Junk2_panelB; Junk2_panelC; Junk2_panelD;  mJunk2_shipwreck Junk2_Boiler; and; Junk2_BoilerCasing (both Boiler and BoilerCasing cause mission to crash if used)
FragmentPanel0a; FragmentPanel0b; FragmentPanel0c; FragmentPanel1;
FragmentPanel2; FragmentPanel3; FragmentStrut

[See Appendix I]


Determining what colour schemes a ship can be:
This is pretty much an optional line and thus is not important. If you do not specifically assign a colour then Homeworld will assign the default colours (as listed below). You can if you want designate specific colours to certain ships or races using the command detailed below, but again if you try this with player race ships, that players colour scheme will take precedence. The directives to control this are:

- BaseColor 		DefaultColorschemenumber,Red,Green,Blue
- StripColor 		DefaultColorschemenumber,Red,Green,Blue
- AvailableColorSchemes	race,shiptype,scheme1,scheme2,scheme3,etc...

By default, the colour scheme of a ship is based on its race.  See the table below for the defaults.  In order for your fancy colour scheme to show up, you must enable it for every ship that will use it by using this directive.

Race can be any valid race. Type can be any ship valid for that race or "All".  The Default colour scheme number(s) are in the range of 0 - 7 inclusive. 

Race				Default colour scheme
R1 (Kushan)				0
R2 (Taiidan)				1
P1 (Turanic Raiders)			4
P2 (Kadeshi Garden Protectors)		5
P3 (T-Mat)				6
Traders (Bentusi & assorted)		7

An example of how to use the colour schemes, originally conducted by Roons;

In the level file [Roons] first added one pirate ship type beyond the basic R1/R2 fleet by;

ExcludeShips    P1,All
IncludeShips    P1,P1MissileCorvette
ExcludeShips    P2,All
ExcludeShips    P3,All
ExcludeShips    Traders,All

He then added these lines creating a black/red stripe colour scheme that replaces the default colour scheme of number 7;

BaseColor                 7, 0, 0, 0
StripeColor               7, 255, 0, 0

Next he made sure that the colour scheme was available to Kushan (R1) Missile Destroyers. The default player colour schemes are available already (0 and 1) and he added his newly defined #7 colour by adding the line;

 AvailableColorSchemes       R1 MissileDestroyer   0,1,7

Next comes the pirates, he decided on purple and set their colour with the following line;

AvailableColorSchemes       P1 P1MissileCorvette   6

In the Mothership_0.missphere file he then added: a Kushan missile destroyer in his new colours, a second Kushan missile destroyer, in the Taiidan default colours , and his purple pirate corvettes;

Ships       Label,-3000.0,-2500.0,0.0,-90.0,R1,MissileDestroyer,1,?|?|colorScheme(7)
Ships       Label,-3500.0,-2500.0,0.0,-90.0,R1,MissileDestroyer,1,?|?|colorScheme(1)
Ships       Label,-3000,-5000,0,90,P1,P1MissileCorvette,5,DELTA_FORMATION|?|colorScheme(6)

This made a mission sphere where he had 2 funky-coloured missile destroyers and a formation of purple pirates.  "Great fun for the whole family!" he says.

Don't worry about the missphere file at the moment we will cover that later, but what's important from them is the colorscheme(#) (Canadian spelling!) part after the last pipe ('|'). And that it must be enabled for every ship that will use it, for both Taiidan and Kushan missile destroyers to use this colour scheme for example, you must copy the line 'AvailableColorSchemes   R1 MissileDestroyer  0,1,7' and replace R1 with R2 and so on.
SongNumber
The directive to control this is:

SongNumber                 	number

SongNumber is any number between 0 and 49 inclusive. In Appendix I there is a copy of a file that lists what every song available is, but you should note that the 'battletracks' are the multiplayer missions files and are song numbers 10 to 16 inclusive. This wont stop players from changing the song themselves using the < and > keys when in the game.

-------------------------------------------------------------

Tutorial Map Part Nine
Lets sort out then what ships will be available on the map and set the default music for your map then. At the moment your Revelations2.level file excludes all alien races bar the Kushan and Taiidan, we however want more, we are going to add a lighly defended station on our map, lets use the Traders for this. Below the line that says "ExcludeShips    Traders,All" we will add the station and its defence by including it on our map using the "IncludeShips" command. We want to add a ResearchStation and the Junk_Lgun and Junk_Sgun. So we would add these three lines;

IncludeShips     Traders, ResearchStation
IncludeShips     Traders, Junk_Lgun
IncludeShips     Traders, Junk_Sgun 

We have not actively excluded the Kushan and Taiidan races so they will be there, adding the lines; 'Includeships    R1,All' and 'Includeships    R2,All' is merely superfluous as both are default races, but you'll notice that LightDefenders, The SuperHeadshotAsteroid and the TargetDrone have been excluded, this is fine as these are rarely used, leave them alone.

Lastly we have the song number, its currently set at '0', which is a sort of default, lets change this to song 10.

So our final lines in the Revelations2.level file will look like this;

ExcludeShips    P1,All
ExcludeShips    P2,All
ExcludeShips    P3,All
ExcludeShips    Traders,All
IncludeShips     Traders, ResearchStation
IncludeShips     Traders, Junk_Lgun
IncludeShips     Traders, Junk_Sgun 
ExcludeShips    R1,LightDefender
ExcludeShips    R2,LightDefender
ExcludeShips    R2,HeadShotAsteroid
ExcludeShips    R1,HeadShotAsteroid
ExcludeShips    R1,TargetDrone
ExcludeShips    R2,TargetDrone
ExcludeGasCloud	All
ExcludeDerelict    All
IncludeDerelict    Crate
SongNumber    10

And that's the level file done. Save your file and close it up. Pat yourself on the back and tell yourself how brilliant you are, you are well on the way now to completing your first map.

-------------------------------------------------------------

